<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //Array 构造函数--数组类
        // 在数组的原型上定义了一个say，那么所有的实例都会拥有一个say
        Array.prototype.say = function(){
            console.log("say")
        }
        var arr = new Array(1,2,3);
        arr.push(4)
        console.log(arr)//[1,2,3,4]
        arr.say();//say
        var res = [];
        res.say()//say
    </script>
</body>
</html>